package org.robot.scm.pojos.archery;

public enum ArcheryStatusEnum {

    workflow_finish("workflow_finish", "正常结束"),
    workflow_abort("workflow_abort", "流程终止"),
    workflow_manreviewing("workflow_manreviewing", "等待审核"),
    workflow_review_pass("workflow_review_pass", "审核通过"),
    workflow_timingtask("workflow_timingtask", "定时执行"),
    workflow_queuing("workflow_queuing", "排队执行"),
    workflow_executing("workflow_executing", "正在执行"),
    workflow_autoreviewwrong("workflow_autoreviewwrong", "审核拒绝"),
    workflow_exception("workflow_exception", "执行异常");

    private final String val;
    private final String desc;

    ArcheryStatusEnum(String val, String desc) {
        this.val = val;
        this.desc = desc;
    }

    public String getVal() {
        return val;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByVal(String val) {
        for (ArcheryStatusEnum archeryStatusEnum : ArcheryStatusEnum.values()) {
            if (archeryStatusEnum.getVal().equals(val)) {
                return archeryStatusEnum.getDesc();
            }
        }
        return null;
    }
}
